<script>
	export default {
		
		onLaunch: function() {
			// uni.hideTabBar()
			console.log('App Launch')
			uni.setStorageSync('onload', '12')
			this.getSystem()
		},
		onShow: function() {
			// console.log('App Show')
			this.$post('home/systemConfig').then(res => {
				if (res.code == 0) {
					uni.setStorageSync('img','https://taoxichuan-bucket.oss-cn-shenzhen.aliyuncs.com'+res.data.home_image)
				}
			})
			
		},
		onHide: function() {
			// console.log('App Hide')
		},

		methods: {
			getSystem() {
				//获取设备信息
				let that = this
				uni.getSystemInfo({
					success(res) {
						let system = res.system.indexOf('iOS');
						var flag = false; //是否X以上机型
						flag = res.statusBarHeight > 20
						if (flag && system == 0) {
							that.globalData.isIphone = 'bottom:30rpx'; // 可手动更改底部高度
						}
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "@/uni_modules/uview-ui/index.scss";

</style>